home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / tools.linux / faq-inn-3 < prev    next >
Internet Message Format  |  1994-02-20  |  56KB

  1. Path: uunet!news.mentorg.com!sdl!not-for-mail
  2. From: tal@Warren.MENTORG.COM (Tom Limoncelli)
  3. Newsgroups: news.software.nntp,news.software.b,news.answers
  4. Subject: INN FAQ Part 3/3: Tutorial on debugging and adding options
  5. Supersedes: <inn-faq-3-751089607@Warren.MENTORG.COM>
  6. Followup-To: news.software.nntp
  7. Date: 5 Nov 1993 05:00:13 -0000
  8. Organization: Mentor Graphics - IC Group, Warren, NJ, USA
  9. Lines: 1408
  10. Sender: tal@Warren.MENTORG.COM
  11. Approved: news-answers-request@MIT.Edu
  12. Distribution: world
  13. Expires: 11/20/93
  14. Message-ID: <inn-faq-3-752475605@Warren.MENTORG.COM>
  15. References: <inn-faq-1-752475605@Warren.MENTORG.COM>
  16. Reply-To: Tom_Limoncelli@Warren.MENTORG.COM (Tom Limoncelli)
  17. NNTP-Posting-Host: sdl.warren.mentorg.com
  18. X-Summary-1: Part 1: Common questions about INN itself, and some advice when compiling it and installing it.
  19. X-Summary-2: Part 2: This assumes that you've successfully compiled the software.  This is a tutorial that takes you through configuration and setting up feeds.  It ends with common questions about INN configuration.
  20. X-Summary-3: Part 3: Norman's quick guide to getting started (assumes SunOS and other things), and misc. other things.)
  21. Xref: uunet news.software.nntp:6372 news.software.b:15097 news.answers:14377
  22.  
  23. Posted-By: auto-faq 2.4
  24. Archive-name: inn-faq/part3
  25.  
  26. Last Changed: $Id: FAQ-inn.3,v 1.44 1993/10/07 19:54:55 tal Exp $
  27.  
  28.                       The INN CONFIGURATION FAQ
  29.                       -------------------------
  30.        by Tom Limoncelli, with additions by many, many others.
  31.  
  32. (Copyright 1992,1993 Tom Limoncelli, this may be redistributed in whole
  33. and only on electronic networks.  Otherwise, contact the author.
  34. Publishers and movie agents should contact me directly.  I'd prefer it
  35. if Tom Cruise plays me in the movie, but if he isn't available we can
  36. negotiate.)
  37.  
  38. A special thanks goes to all the people that have helped put this
  39. together.  I've tried to give credit where credit is due.  Additions
  40. and corrections should be sent to tal@Warren.MENTORG.COM.  DO NOT
  41. send requests for help to Tom.  Post them to news.software.nntp.
  42.  
  43.  
  44.                           Table Of Contents:
  45.                           ------------------
  46.  
  47. GENERAL OVERVIEW OF INN
  48.     Should I read the install.ms file in its entirety before
  49.         reading this document?
  50.     How does it all fit together? (LONG)
  51.     Terminology used in the rest of this document.
  52.     What should I monitor as I debug INN problems.
  53. CONFIGURATION DEBUGGING GUIDE
  54.     Connecting to a TCP/IP server.
  55.     My innd won't start!
  56.     Make sure that "feeders" can connect.
  57.     Make sure that "readers" can connect.
  58.     Make sure that clients can post.
  59.     "client" doesn't have the software needed to post.
  60.     Debugging the "newsfeeds" file.
  61.     The ME line in the newsfeeds file.
  62.     Cookbook example of an outgoing NNTP feed:
  63.     Cookbook example of an outgoing UUCP feed:
  64.     Testing an outgoing feed (your "newsfeeds" configuration).
  65.     Cookbook example setting up NOV ("overchan").
  66. STARTUP PROBLEMS AND SYSLOG MESSAGES
  67.     syslog message: ME internal no to group
  68.     syslog message: ME cant sendto CCreader bytes 4 No such file or directory.
  69.     syslog message: ME internal no control and/or junk group
  70.     syslog message: ME bad_newsfeeds no feeding sites
  71.     Why do all these "readclose" messages show up in my syslog?
  72.     "File exists writing symlinking article file -- throttling"
  73.     "cant fopen <newsgroup>/.thread No such file or directory"
  74. MISC QUESTIONS
  75.     Can I edit my configuration files where they are, or do I have
  76.         to edit them in $INN/site ?
  77.     syslog message:  ME cant nonblock 15 Operation not supported.
  78.     Suddenly my active and history files are owned by root!
  79.     What can I do if I can't purchase the O'Reiley And Associates book
  80.         on Managing Usenet?
  81.     Getting an active file.
  82.     How do I use nntplink with INN?
  83.     How do I use newsgate with INN?
  84.     Other cron jobs.
  85.     After a crash.
  86.     Debugging someone that is feeding you.
  87.     Feeds suddenly can't connect anymore!
  88.     How does the "ME" line interact with the other lines?
  89.     Why doesn't nntpget work?
  90.     More about the "to.*" groups.
  91.     I'm getting groups sent to me that I don't want.
  92.     When my feeder connects, I get articles but they don't take
  93.         what's waiting for them.
  94.     Directories are being created with wrong permissions.
  95.     Can I split my news spool across partitions?
  96.     Warnings to people that must set HAVE_UNIX_DOMAIN to DONT
  97.  
  98.  
  99. NOTE:  Read this document through from beginning to end after
  100. you first compile INN.  Later, use it for reference if problems
  101. come up.
  102.  
  103. ======================================================================
  104.  
  105.                        GENERAL OVERVIEW OF INN
  106.  
  107. ======================================================================
  108.  
  109.  
  110. ------------------------------
  111.  
  112. Subject: Should I read the install.ms file in its entirety before reading this document?
  113.  
  114. YES!  Install.ms tells you how to compile and install the software.
  115. This document walks you through debugging the *configuration* of the
  116. software once it is installed.
  117.  
  118. This document takes you from where install.ms leaves off, gives you a
  119. quick overview of how all the pieces fit together, and then takes you
  120. through specific debugging tasks.
  121.  
  122. Debugging INN problems is often difficult because one needs to be an
  123. experienced netnews person to do it well.  You can only get experience
  124. by having a properly running system.  This is a catch-22.  This
  125. tutorial attempts to take you through the basics.  The rest you'll
  126. figure out.
  127.  
  128. Newsgroups you should know exist:
  129. news.software.nntp  -- INN questions go here.
  130. news.software.b     -- Discussions about any of the many software
  131.     packages that support the "B news" format (i.e. INN, C news,
  132.     ANU-NEWS, etc.)
  133.  
  134. This document also takes you through the process of verifying that your
  135. system is properly configured.  When you are done, you should:
  136.  
  137. 1.  be sure that when feeders connect they are treated as feeders.
  138.  
  139. 2.  be sure that when clients connect they are treated as clients.
  140.  
  141. 3.  be sure that posting works.
  142.  
  143. 4.  be sure that your out-bound feeds are properly configured.
  144.  
  145.  
  146. ------------------------------
  147.  
  148. Subject: How does it all fit together? (LONG)
  149.  
  150. Here is a fantastic overview of the workings of INN.
  151.  
  152. From: Ken Hornstein <kenh@leps5.phys.psu.edu>
  153.  
  154. I discovered that the biggest problem I had with INN was understanding how
  155. everything fits together (since I had no experience with B or C news).
  156. Here's a (hopefully) simple description of how everything fits
  157. together:
  158.  
  159. After running rc.news (as "root"), you should have the "innd" daemon
  160. running ("ps" will show the process to be owned by "news").  This is
  161. the Master Daemon.  It handles incoming connections, stores the
  162. articles on your disk, but does _not_ send any articles out itself.  It
  163. directs other programs to do that.  Exactly where articles are sent and
  164. how they are sent is determined by the "newsfeeds" file.  Setting up
  165. your newsfeeds file will be the hardest part of configuring INN.  Here
  166. are some example entries from my newsfeeds file:
  167.  
  168. ra/ra.nrl.navy.mil\
  169.         :*,!psu.*/!psu\
  170.         :Tf,Wnm:
  171.  
  172. Looks complicated?  It isn't.  Here's what it means:
  173.  
  174. "ra" is the name of the feed.  "/ra.nrl.navy.mil" is an alias for ra.
  175. This is important because INN uses the "Path" header to insure the
  176. articles are not sent to sites where they have already been.  Thus, any
  177. article that has "ra" or "ra.nrl.navy.mil" in the Path header will NOT
  178. be sent to this site.
  179.  
  180. The second line tells what articles will be sent to this site.
  181. "*,!psu.*" means that all articles that are not in psu.* will be sent
  182. to ra.  The details of the pattern matching is found in the wildmat(3)
  183. man page.  The "/!psu" means that articles with a "Distribution" header
  184. of psu will also not be sent to ra.
  185.  
  186. The last field specifies exactly what _kind_ of feeds.  "Tf" means this
  187. is a file feed.  Unless you have unusual requirements, all of your
  188. feeds will be file feeds.  "Wnm" means that the relative path name and
  189. the Message-ID of the article will be written to this file.  By
  190. default, this file is called the same name as your feed file, and is in
  191. your out.going directory.  So on my system, every article destined to
  192. ra will have its filename and Message-ID written to the file
  193. "/var/spool/news/out.going/ra".
  194.  
  195. So how do the articles actually GET to ra?  You run a program that
  196. reads the feeds file and transmits the article.  Two such programs are
  197. included with INN -- "send-nntp" and "nntpsend".  My personal
  198. preference is for nntpsend.  If you are going to use nntpsend, you will
  199. need to add a similar line to your nntpsend.ctl file:
  200.  
  201. ra:ra.nrl.navy.mil
  202.  
  203. This tells nntpsend that articles in the feed file "ra" should be sent
  204. to the site "ra.nrl.navy.mil".  I run nntpsend out of cron every 10
  205. minutes with this line (in /usr/lib/crontab):
  206.  
  207. 0,10,20,30,40,50 * * * * /bin/su news -c '/usr/local/news/bin/nntpsend'
  208.  
  209. This is under Ultrix.  A sane cron would let you specify the userid to
  210. run programs under.
  211.  
  212. UUCP feeds work similarly and are described in a different section.
  213.  
  214. As each article comes in (note that hosts feeding you _must_ be listed
  215. in the hosts.nntp file), innd will examine it and distribute to your
  216. listed feeds based on the above-described selection criteria.
  217.  
  218. One last important thing to do is to make sure your articles get
  219. expired.  This is done from the "news.daily" script.  The "expire.ctl"
  220. file describes how long you want each article to last.  Here are some
  221. sample lines from my expire.ctl:
  222.  
  223. /remember/:14
  224.  
  225. This line tells expire to keep history entries for articles 14 days
  226. after they have been deleted.
  227.  
  228. *:A:1:7:21
  229.  
  230. This is the default line.  This says that by default, an article is
  231. kept a minimum of one day, the default expiration time is 7 days (this
  232. applies if there is no "Expires" header), and the very maximum that the
  233. article is kept is 21 days.
  234.  
  235. psu.*:A:1:14:28
  236.  
  237. This line applies to groups only in Penn State.  By default, those
  238. articles will last 14 days, 28 days at the most.
  239.  
  240. Note that lines in expire.ctl should have the most general entries
  241. first, with the most specific entries last.
  242.  
  243.  
  244. ------------------------------
  245.  
  246. Subject: Terminology used in the rest of this document.
  247.  
  248. We will pretend that your machine is named "nntphost" or
  249. "nntphost.do.main" and that there is a client named "client" or
  250. "client.do.main".
  251.  
  252. Some machines connect to you to try to feed you new articles.  We'll
  253. call these machines "feeders".  Some machines try to connect to you to
  254. read and/or post articles.  We'll call these machines "readers".
  255.  
  256.  
  257. ------------------------------
  258.  
  259. Subject: What should I monitor as I debug INN problems.
  260.  
  261. 1.  run "tail -f /var/adm/messages" to see if any syslog messages are
  262. being generated.
  263.  
  264. 2.  run "tail -f /var/log/news/news.err" to see if any fatal errors
  265. happen. 
  266.  
  267. 3.  Check for incoming email constantly (especially when trying to post
  268. from "nn").
  269.  
  270. ======================================================================
  271.  
  272.                     CONFIGURATION DEBUGGING GUIDE
  273.  
  274. ======================================================================
  275.  
  276.  
  277. ------------------------------
  278.  
  279. Subject: Connecting to a TCP/IP server.
  280.  
  281. You know that "telnet"'ing to a machine lets you log into it.  Many
  282. TCP/IP services allow you to "telnet" into their port and talk directly
  283. to them.  Try "telnet nntphost 21".  This means log into port #21 (the
  284. "ftp" port) instead of the usual remote login port.
  285.  
  286. Once you are in, you'll get no prompt.  Type "help" and press RETURN.
  287. You should get a list of commands.  If you know what the commands are,
  288. you can talk to this server.  Type "quit" and press RETURN to get out.
  289.  
  290. After every command you should get some kind of status message.  Each
  291. line will begin with a number.  Each message has a unique number.
  292. Errors are defined as anything that starts with a number >= 400.
  293.  
  294. SMTP (mail) and NNTP (netnews) work the same way.  Telnet into their
  295. port and issue commands and data.  "quit" always gets you out.
  296.  
  297. We'll use this to debug INN configurations by "telnet"'ing into the
  298. innd server and seeing the raw error messages it gives us.
  299.  
  300. Try "telnet"'ing into the NNTP port (#119) of a working NNTP server to
  301. see what it's like.
  302.  
  303.  
  304. ------------------------------
  305.  
  306. Subject: My innd won't start!
  307.  
  308. Keep a "tail -f /var/adm/messages" running.  INN reports most errors
  309. via syslog.  The syslog messages usually explain what is wrong.
  310. Elsewhere in this document are details about some of the less obvious
  311. syslog messages.
  312.  
  313. Chances are, INN is starting, finding a misconfigured "ME" line in the
  314. newsfeeds file, and exiting.  You might want to read the section on
  315. configuring your "newsfeeds" file first.
  316.  
  317. Rich Salz says a common reason is that you ran makehistory but didn't
  318. rename the DBZ files.  "makehistory" generates history.n.dir
  319. and history.n.pag.  They must be renamed:
  320.     mv history.n.dir history.dir
  321.     mv history.n.pag history.pag
  322.  
  323. Izar Tarandach <izar@cs.huji.ac.il> suggests that another common
  324. mistake is that innd wasn't being started by the correct uid.  innd
  325. (and therefore rc.news) must be started from "root" (not "news").  It
  326. immediately turns itself in user "news" once certain tasks are
  327. completed.
  328.  
  329.  
  330. ------------------------------
  331.  
  332. Subject: Make sure that "feeders" can connect.
  333.  
  334. "feeders" are listed in hosts.nntp.  "readers" are listed in
  335. nnrp.access.  This section deals with "feeders" and hosts.nntp.
  336.  
  337. When a machine connects to the NNTP port of nntphost, it connects to
  338. the innd process.  innd knows the internet address of the machine that
  339. is making this connection, and sees if it matches the internet
  340. addresses many of the machines listed in the hosts.nntp file.
  341.  
  342. If the machine is not listed in hosts.nntp, it is assumed that this
  343. machine is not a "feeder" and forks off a nnrpd to handle this
  344. connection as a "reader".  If you didn't know that, you didn't read
  345. enough of the INN installation documentation.  Go back and read it
  346. now.
  347.  
  348. Read the man page hosts.nntp to get a complete understanding of what's
  349. going on.  nnrpd uses its own authentication scheme, which is
  350. described in the next section.
  351.  
  352. Since I know you didn't read that man page, I'll give you one more
  353. chance to read them now.
  354.  
  355. Let's configure hosts.nntp.  Just enter the names of all the machines
  356. that feed you:
  357.  
  358. feeder1.do.main:
  359. feeder2.do.main:
  360.  
  361. I don't use passwords yet.  If you do, add them after the ":".
  362.  
  363. Now let's test to see if the feeder can connect properly.
  364.  
  365. Log into to the feeder and "telnet nntphost 119".
  366.  
  367. If you can't log into a feeder, configure your own machine as a feeder
  368. (i.e. feeder to itself) for testing purposes.  Once you can see that
  369. INN is treating that machine as a feeder you can replace the machine's
  370. name with the name of a real feed.
  371.  
  372. If you are given an error message and booted out, check the error
  373. message to see what's wrong.  Maybe the machine is running maintenance
  374. at the time and you have to try again later.  Maybe the machine doesn't
  375. recognize you at all and you have to edit "hosts.nntp" (and don't
  376. forget the "ctlinnd reload" command!).
  377.  
  378. If your "history" file or other files have the wrong ownership or
  379. protections INN will mention the offending file in the error message.
  380. Another common mistake is that people try to use wildcards in
  381. hosts.nntp (which is not supported).  Remember, there are very few
  382. machines that you consider to be "feeders", so you don't want to use a
  383. wildcard.
  384.  
  385. To test a "feeder":  If "feeder1" can send an "ihave" command and get a
  386. "335" as a response, you know that "nntphost" is permitting "feeder1"
  387. to transfer news as a "feeder".  "ihave" requires an operand.  I
  388. usually type "ihave <1@test>" ("<1@test>" is a Message-ID that I know
  389. doesn't exist) and press RETURN.  If I get "500 What?" I know that innd
  390. assumed that I'm a "reader" (so I have to edit my "hosts.nntp" file and
  391. add this client).  If I get "335" and then a blank prompt, then INN is
  392. expecting to be fed an article.  I usually just "^]" (control-]) and
  393. "quit" out; I know that it was willing to accept the article.  If I get
  394. some other error message, it usually gives me enough information to
  395. debug the problem.
  396.  
  397.  
  398. ------------------------------
  399.  
  400. Subject: Make sure that "readers" can connect.
  401.  
  402. As I wrote before, if a connection comes from a machine that isn't
  403. listed in the hosts.nntp file, it is assumed to be a "reader".  A
  404. "feeder" can also issue the "mode reader" command to become a
  405. "reader".  If you have "telnet"'ed in as a "feeder", try issuing this
  406. command.
  407.  
  408. Note: If a site is going to feed *and* read, you'll have to link
  409. readers with innd's client library. The reason for this is that the
  410. clients must tell innd that they want to read using the "mode reader"
  411. command.  The library does that automagically.  It is rare that you
  412. have a machine that is a reader and a feeder (since people will want to
  413. read on their local machine, not yours.)  News readers are now
  414. being packaged as "INN ready" so this will be less and less of a
  415. problem.
  416.  
  417. Once the connection has been handed off to nnrpd, nnrpd checks to make
  418. sure you are authorized.  It does that by reading the nnrp.access
  419. file.
  420.  
  421. There is a problem with what you enter in that file.  Namely, I might
  422. call the client machine "client", but that doesn't matter.  What
  423. matters is what "nntphost" thinks "client" is called.  Maybe "nntphost"
  424. thinks its name is "client.do.main" or even "137.202.177.3".  It
  425. doesn't matter what *you* call "client", permissions in the nnrp.access
  426. file have to be specified based on what "nntphost" calls "client".
  427. Technically, nntpd uses gethostbyaddr() to reverse-lookup the name.
  428. gethostbyaddr() uses DNS or, if you are on a brain-dead Sun running
  429. Sun's NIS/DNS hack, it uses NIS, or DNS, or whatever the hell Sun was
  430. thinking when they created that cruft.
  431.  
  432. To find out what "nntphost" thinks your machine is called, do the
  433. following:  Telnet from "client" to "nntphost" and execute the "finger"
  434. command (just "finger" alone on the command line).  The last column is
  435. what "nntphost" thinks your machine is called.
  436.  
  437. If you don't have an account on both machines things are more
  438. difficult, consult your NIS or DNS expert to tell you what the answer
  439. would be.
  440.  
  441. There is one exception to this technique.  If you are using SunOS and
  442. braindead NIS you get just the machine name (like "milk") instead of
  443. the FQDN (like "milk.warren.mentorg.com") then you must tack on a
  444. period then the domain of the machine.
  445.  
  446. So, with this knowledge (what your nntphost think's client's name is)
  447. and a copy of the man page, edit nnrp.access and add "nntphost"'s name
  448. for "client" to the file.  Only nnrp.access can have wildcards (for
  449. example, "*.sjc.mentorg.com").  You'll want to include wildcards for
  450. all the domains that should be allowed to read/post.
  451.  
  452. Here are some decent examples from my nnrp.access file:
  453.  
  454. -------------------------------------- Tom's nnrp.access file START
  455. ## Default is no access, no way to authentication, and no groups.
  456. *:: -no- : -no- :!*
  457. *.mentorg.com:Read:::*
  458. *.mentor.com:Read:::*
  459. *.warren.mentorg.com:Read Post:::*
  460. -------------------------------------- Tom's nnrp.access file END
  461.  
  462. The second field of "nnrp.access" is case sensitive.  "read post" does
  463. not mean the same as "Read Post".  If you know this already it's
  464. because you read the man page.
  465.  
  466. Note:  nnrpd will append the domain to a name that is not a FQDN.
  467. There is no need to try to find a wildcard that will match non-FQDN
  468. names (i.e. machines in your local NIS cluster).  Previously this FAQ
  469. had reported that "*[^.]*" would match these names but that was wrong
  470. (the wildcard matches everything, oi!).  nnrpd turns non-FQDN's into
  471. FQDNs.
  472.  
  473. After you change "nnrp.access" you don't have do "ctlinnd reload" since
  474. the file is read by each nnrpd as they start up.
  475.  
  476. Now "nntphost" should be letting "client" read.  Let's test this out:
  477.  
  478. Log into to the reader and "telnet nntphost 119".
  479.  
  480. To test a "reader":  Give the "mode reader" command and see how it
  481. likes it.  If it doesn't give an error, then nnrp.access is letting you
  482. through.  To read an article (or just get the header) type "head
  483. <2@test>" and press RETURN.  Again, "<2@test>" is a message-id that I
  484. know doesn't exist.  If you are allowed to read at all, it will tell
  485. you that it can't find that article.  You might try the command with an
  486. message-id that you know exists.
  487.  
  488. You are done with that phase.  Now you should test to see if posting is
  489. permitted.  Skip ahead to the next section.
  490.  
  491. If "mode reader" gives an error (and rudely disconnects you) then you
  492. have a typo in nnrp.access OR you didn't issue the "ctlinnd reload"
  493. command correctly (or at all) OR nntphost thinks that "client" is
  494. called yet something else OR innd can't exec nnrpd for one reason or
  495. another -- see the syslog output or the innd.err log file.  Go to the
  496. beginning of this section and start over.
  497.  
  498. Note: Some telnet implementations are Real Stupid and disconnect you
  499. before showing the error message.
  500.  
  501. You can also run nnrpd by hand if you have
  502.     stdin:Read Post:::*
  503. in your nnrp.access file.  Just run nnrpd and type interactively.  This
  504. is useful for making sure it's compiled right.
  505.  
  506.  
  507. ------------------------------
  508.  
  509. Subject: Make sure that clients can post.
  510.  
  511. The "inews" command (usually in /usr/local/bin) takes a post from a
  512. user, adds any missing headers, appends the first 4 lines of
  513. ~/.signature (if it exists), and possibly replaces any headers that are
  514. seriously forged.  "inews" will also reject a message if you really
  515. botch it.  "inews -h" expects a post on stdin beginning with headers,
  516. then a blank line, then the body.  "inews -h -D" doesn't post the
  517. message, but outputs what it would have posted.  The minimum headers
  518. one can feed is "Newsgroups:" (which is plural) and "Subject:" (which
  519. is singular).
  520.  
  521. By the way, after a header there is exactly one colon then exactly one
  522. space.  The space is a space, not a tab.  Also, the list of newsgroups
  523. on the "Newsgroups:" line is a comma separated list, with no spaces.
  524. There are no spaces before the colon.  If there is nothing after the
  525. colon or if there is only whitespace after the colon then that header
  526. will be removed by "inews".  Sites that don't remove such "empty"
  527. headers have broken software.  Get it?  Got it?  Good.
  528.  
  529. Here's the test message I constantly use:
  530. ------------------------ cut here 8<
  531. inews -h -D
  532. Newsgroups: foo.test
  533. Subject: test of inn posting
  534.  
  535. this is a test
  536. ------------------------ cut here 8<
  537.  
  538. Exciting huh?
  539.  
  540. You might also use the 'feedone' program in the frontends directory.
  541. Do "cd $inn/frontends ; make feedone" to get it built.  To run it, do
  542.  
  543.        feedone -t -r /tmp/inews.output
  544.  
  545. This will (-t) trace all I/O with the server and (-r) use a random
  546. message-id each time.  If you want to test posting from a newsreading
  547. host (i.e., one that connects to nnrpd and uses the POST command) use
  548. the -p flag.
  549.  
  550. If inews was able to get to the /usr/lib/news/inn.conf file (for
  551. defaults) you should get a nice post on your screen.  If you don't,
  552. here are my suggestions:
  553.  
  554. 1 -- You have an old inews from C news or B news laying around
  555. 2 -- inews will give you an error message saying what's wrong.
  556.  
  557. You might want to look around the usual places to make sure that there
  558. are no old versions of "relaynews" or "inews".  People trying to use
  559. the "inews" from C news will get a message about "can't open
  560. redirection" or similar.  Make sure they are running the programs
  561. included with INN.  There is something called "mini-inews" which should
  562. just take a post and send it to the nntp server.  Delete that and
  563. replace it with INN's inews.  INN's inews is mini-inews and regular
  564. inews, it is the ying and then yang of inewses.  It is the one inews to
  565. end all inewses and all others are false idols.
  566.  
  567. Note:  False idol worshipper and heathen David Myers <dem@meaddata.com>
  568. reports that mini-inews works fine.  He stays with mini-inews...
  569. "because INN inews needs to access not only inn.conf, but moderators,
  570. too.  Installing and maintaining these files in a ~1000 client,
  571. multiple administrative domain setup like ours is too much of a pain.
  572. Most (all?) of the work done by INN inews is done by in.nnrpd during
  573. posting, anyway."
  574.  
  575. Kenji Rikitake <kenji@rcac.astem.or.jp> reports:
  576. "Keep in mind that INN inews refers to many environment variables.
  577. Beware of _inherited_ variables especially when you do su to maintain
  578. your news server.
  579. I got trapped and wasted a day with NNTPSERVER.  I tried to post to a
  580. local newsgroup, and inews kept refusing it and sending me 'no such
  581. newsgroups...' error message.  I finally found out that inews was
  582. looking up a wrong server, _implicitly_ specified by
  583. 'setenv NNTPSERVER ...' in my .login script.  It took a day to find
  584. such a subtle misconfiguration, after a whole recompilation of entire
  585. INN kit, active and history rebuilding, and all possible configuration
  586. checking.  *sigh*"
  587.  
  588. INN's inews sometimes prints the error: "Can't get list of newsgroups,
  589. No such file or directory.".  inews called CAlistactive() to get a
  590. local copy of the active file.  If it can't reach the active file you
  591. get this error.  Look at your PATH_TEMPACTIVE and see if it makes
  592. sense; i.e., if it is a valid /tmp directory.
  593.  
  594. "inews -h" sometimes reports:
  595.     Can't send article to the server:
  596.     441 480 Transfer permission denied
  597. This means that you set HAVE_UNIX_DOMAIN to DONT and you don't have
  598. your news server in its own hosts.nntp file.  (nnrpd gets a POST,
  599. connects to innd over a TCP socket and sends an IHAVE.) (thanks to Chris
  600. Jackson <cjj@sun.com> for pointing this out).  Add your news server's
  601. name to hosts.nntp and do "ctlinnd reload hosts.nntp".
  602. (for the reason why, read "Warnings to people that must set
  603. HAVE_UNIX_DOMAIN to DONT")
  604.  
  605.    If it still doesn't work, look through your syslog to see the name
  606. of the host that innd got, and why it handed off to nnrpd.  Perhaps
  607. there is a DNS/NIS/hosts-file mismatch.  (suggested by Rich Salz)
  608.  
  609. Other problems are usually the result of not being able to find the
  610. "inn.conf" file (copy it to the client or make it available via NFS) or
  611. you are using Sun's brain-dead NIS/DNS stuff which doesn't do reverse
  612. name lookups well.  If inews tells you that it can't generate a
  613. Message-ID, this is because it can't figure out your domain.  Force it
  614. to know your domain by adding a "domain:" line in "inn.conf".
  615.  
  616. Once you get "inews -h -D" working, do the same test without the "-D" option
  617. and let it actually post the message.  If it can't post, it will tell
  618. you why.  If the answer isn't clear enough, "telnet nntphost 119", give
  619. the "mode reader" command, then the "post" command.  Enter lines of
  620. text like you would to "inews -h" and then type "." on a line by itself
  621. (and press RETURN).
  622.  
  623. If posting via "telnet nntphost 119" DOES work and posting via "inews -h"
  624. DOES NOT work, you know that (1) "inews" is compiled wrong, or more likely,
  625. (2) you aren't using INN's inews.  Either way, if this is happening
  626. you know you have narrowed your problems down to the inews program.
  627.  
  628. By the way, posting to misc.test is pretty useless considering that the
  629. entire world doesn't need to see your message.  Post to a local
  630. newsgroup or even a state-wide newsgroup like "nj.test" (assuming you
  631. are in New Jersey).  There are lots of people that reply to every test
  632. message they see, so expect to get tons of stupid email.  (though, if
  633. you don't get any email consider yourself lucky).  Also, there is no
  634. newsgroup called "news.test" so don't post there.  Many do, many fail.
  635. By the way, if you are one of those people that reply to every test
  636. message they see, get a real hobby.
  637.  
  638. Do *NOT* post your test message to a non-test newsgroup.  You will get
  639. many angry replies from all over the world.
  640.  
  641. Look at the posted message in the news spool (if you post a message to
  642. nj.test, "cd /var/spool/news/nj/test" and cat the highest numbered file
  643. you see).  If your site name is listed multiple times in the "Path:"
  644. header, put your server's name on the "pathhost:" line of
  645. "inn.conf" and recompile INN with "INEWS_PATH" set to
  646. "DONT".  (I don't know why Rich likes that as the default!)
  647.  
  648. REMEMBER:  inn.conf is read into innd only once.  After it is changed,
  649. the innd daemon must be shutdown and restarted.  (use "ctlinnd shutdown x"
  650. and then run rc.news as root).
  651.  
  652. If "inews -h" posts a message, smile because most of the battle is over.
  653.  
  654.  
  655. ------------------------------
  656.  
  657. Subject: "client" doesn't have the software needed to post.
  658.  
  659. If the client doesn't have "inews" at all, check the INN installation
  660. manual to find out how to compile it.  There is a special gimick
  661. included with INN to compile inews for the various other OS's and
  662. versions of Unix without having to compile the entire INN package.
  663.  
  664. Since nnpost, Pnews, postnews, and all other news posting software
  665. shouldn't do anything but ask for header information, let you add a
  666. body, and then pipe the whole thing to "inews -h", you can be pretty
  667. certain that if "inews -h" works, your news posting programs will
  668. work.  Think again!  Post from each of them and make sure they all get
  669. posted.  You might find that they access a copy of "inews" that was
  670. part of C news, mini-inews, or heavens knows what.
  671.  
  672. I highly recommend that people use "find" or "gnufind" to seek
  673. out and replace any old versions of "inews".
  674.  
  675. gnufind / /usr /usr/local /usr/lib -xdev -name inews\* -print
  676.  
  677. For every one that you find, do the following:
  678.  
  679. mv inews inews.cnews
  680. ln -s /usr/local/bin/inews inews
  681.  
  682. Now you only have to update /usr/local/bin/inews, rather than
  683. chasing may copies.
  684.  
  685. "nn" and "nnpost" create a file called "~/.nn/params" right before you
  686. post with tons of useful information.  While posting you can shell out
  687. of the editor and view the file.  The file is deleted after the message
  688. is posted.  I had to view this file while shelled out of my editor to
  689. find which "inews" was being used by "nnpost".
  690.  
  691. It's also a good idea to check your mail now and then while you are
  692. doing this.  Some newsreaders (like "nn" notify you of a posting
  693. problem via mail.
  694.  
  695. On non-INN systems, "inews" returns pretty quickly.  Actually they fork
  696. a process to do the actual posting in the background.  When those
  697. "inews" return, you don't know if the post was successful or not.
  698. These "inews"'s have a "-W" option which turns off this forking feature
  699. (i.e. Wait for the post to complete).
  700.  
  701. INN's "inews" never forks because the wait is never that long.  When
  702. "inews" returns you know if the post was successful or not.  INN's
  703. "inews" accepts the "-W" option for compatibility.
  704.  
  705. This may seem obvious, but when posting a test message, consider
  706. including the machine you are posting from and the program you are
  707. using.  Even though you may check to see if the message got posted
  708. after every test, this will help you later when you go back to see what
  709. you have done.
  710.  
  711.  
  712. ------------------------------
  713.  
  714. Subject: Debugging the "newsfeeds" file.
  715.  
  716. Outgoing news is controlled by the "newsfeeds" file.  The INN 1.2 man
  717. page for this file is a bit complex.  The man page in 1.3 (and beyond)
  718. gives better examples.  Here's a "cookbook" of examples that should
  719. cover most of your needs.  Debugging tips are also included.
  720.  
  721. Always remember that newsfeeds uses "wildmat" matches, not the
  722. semi-regular expressions that C news uses.  This means that if you want to get comp.foo and the subgroups under it (comp.foo.bar, comp.foo.baz, etc.) you
  723. have to use a statement like:
  724.  
  725. comp.foo,comp.foo.*
  726.  
  727. OR
  728.  
  729. comp.foo*
  730.  
  731. BUT NOT
  732.  
  733. comp.foo.*
  734.  
  735.  
  736. ------------------------------
  737.  
  738. Subject: The ME line in the newsfeeds file.
  739.  
  740. The "ME" entry is a bit confusing.  Be careful when you
  741. read the man page.
  742.  
  743. Here is the "ME" line that I use in my "newsfeeds" file.  I find
  744. it works quite well, but you might want to remove the distributions
  745. that you don't need (i.e. New Jersey).  Since my site has clients
  746. reading from all over the world I try to have every distribution I
  747. can find.  However, I hear of a new distribution almost daily so this
  748. list is always changing.
  749.  
  750. ME:!*/\
  751. news,gnu,comp,biz,alt,rec,misc,sci,soc,talk,inet,world,worldwide,all,\
  752. aus,su,uk,york,eunet,na,can,qc,tor,us,usa,mn,oh,chi,ca,ba,tx,pnw,il,ne,\
  753. ny,nyc,phl,bl,nj,warren::
  754.  
  755. If you want to blindly accept all distributions, try this:
  756.  
  757. ME:!*::
  758.  
  759.  
  760. ------------------------------
  761.  
  762. Subject: Cookbook example of an outgoing NNTP feed:
  763.  
  764. This example involves a machine named oddball.mentorg.com, that has an
  765. alias of oddball.sjc.mentorg.com, which should receive all posts (but
  766. control & junk should never be passed on) and not certain
  767. distributions.  Add the following line to newsfeeds:
  768.  
  769. oddball.mentorg.com/oddball.sjc.mentorg.com:*,!control*,!junk/!local,!warren:Tf,Wnm:
  770.  
  771. Have the user "news" run the following via cron:
  772.  
  773. 3,23,43 * * * *  /usr/lib/news/bin/nntpsend >/dev/null 2>&1
  774.  
  775. (this only needs to be added once.  nntpsend refers to a file
  776. called nntpsend.ctl to find out what to do).
  777.  
  778. Add the following to nntpsend.ctl:
  779.  
  780. oddball.mentorg.com:oddball.mentorg.com::
  781.  
  782. Done!
  783.  
  784.  
  785. ------------------------------
  786.  
  787. Subject: Cookbook example of an outgoing UUCP feed:
  788.  
  789. Example:  A site named "plts" that can not get the "clari" newsgroups
  790. or distribution "warren".
  791.  
  792. Add the following to the newsfeeds file:
  793.  
  794. plts:*,!clari.*,!junk*,!control*/!warren:Tf,Wnb:
  795.  
  796. Add the following to the cron tab (as user "news"):
  797.  
  798. 0 0-5,16-23 * * 1-5       /usr/lib/news/bin/sendbatch -c plts >/dev/null 2>&1
  799.  
  800.  
  801. ------------------------------
  802.  
  803. Subject: Testing an outgoing feed (your "newsfeeds" configuration).
  804.  
  805. Here is a decent game-plan for testing your newsfeeds configuration:
  806.  
  807. Suppose your site is in New Jersey and you have a distribution called
  808. "mentorg" which should be used by people that want to make sure that
  809. their post will not leave their company (Mentor Graphics).  You should
  810. do a test post to "nj.test" with no "Distribution:" header, and with
  811. "Distribution: nj" and "Distribution: mentorg".  After posting, do a
  812. "ctlinnd flush ''" and make sure that the /var/spool/news/out.going
  813. files for all your sites did/didn't queue up those three messages as
  814. appropriate.
  815.  
  816. IMPORTANT:  Remember to do a "ctlinnd reload newsfeeds x" command every
  817. time you update your "newsfeeds" file!
  818.  
  819. Finally, for checking out changes to newsfeeds, I've found "ctlinnd
  820. checkfile" handy.
  821.  
  822.  
  823. ------------------------------
  824.  
  825. Subject: Cookbook example setting up NOV ("overchan").
  826.  
  827. Christophe.Wolfhugel@grasp.insa-lyon.fr (Christophe Wolfhugel) (with
  828. many modifications from Tom Limoncelli) writes:
  829.  
  830. Step 1:  Upgrade to INN 1.4 or higher:  Most of the bugs in 1.3 were
  831. related with overchan.  In fact, the reason why many people used 1.3
  832. without any problems was due to the fact that they were not using
  833. overchan (and didn't hit on some of the bugs that appeared for SVR4
  834. users, all of which were fixed in 1.4)
  835.  
  836. Step 2:  Make sure INN is working.  Get everything else working before
  837. you try to get overchan to work.  You'll only confuse yourself.
  838.  
  839. Step 3:  Ponder if you have enough disk space.  NOV uses up an
  840. additional 10%-20% of your news spool.  This is a good 100 Mb if you
  841. have a full feed.  The real space savings come when you delete your
  842. separate databases for trn, nn, and tin and use one unified database.
  843. All serious newsreaders will have NOV support soon.
  844.  
  845. Step 4:  Edit overview.fmt (it's in the $INN/site directory, or you can
  846. edit it where it was installed, in /usr/lib/news ) to include
  847. "Xref:full" as the last line.  (i.e. uncomment out the last line).
  848.  
  849. Step 5:  Add this entry to your "newsfeeds" file.  overchan gets it's data
  850. from a special feed.
  851.  
  852. # This feeds header data to NOV:
  853. OVERVIEW!:*:Tc,WO:/usr/local/news/bin/overchan
  854.  
  855. Read the "newsfeeds" man to make sure you understand what you've
  856. just done.
  857.  
  858. Step 6:  (optional) To create the original database:
  859.  
  860.     (run this as "news")
  861.     % /usr/local/news/bin/expireover -a -s
  862.  
  863. If you skip this step, access will be slow for articles that came
  864. in before you started "overchan".  This is not a problem.  You
  865. will get a lot of warnings in your "news.daily" output until
  866. you have received at least one new article in each newsgroup.
  867.  
  868. [ Note:  "a lot of warnings" means one for every newsgroup.  This can
  869. make your news.daily report >6000 lines.  The lines will all look
  870. like:
  871. overchan cant open clari/local/washington/.overview, No such file or directory
  872. overchan cant open clari/local/sfbay/.overview, No such file or directory
  873. overchan cant open uc/news/.overview, No such file or directory
  874. ]
  875.  
  876. Step 7:  Change the invocation of news.daily:
  877.  
  878. In the crontab file for "news", edit the "news.daily" line to be
  879. something like:
  880.  
  881.    news.daily delayrm expireover
  882.  
  883. (the expireover is required if you use overchan)
  884.  
  885. Step 8:  Inform your users that you now support "NOV, the News OverView
  886. database" and suggest that people switch to newsreaders that use
  887. newsreaders that are compliant with the Overview format.
  888.  
  889. Step 9:  You are done.
  890.  
  891. Step 10:  In a few weeks, drop support for mthreads, nnmaster, etc.
  892. (assuming you've upgraded to replacements that use Overview)
  893.  
  894. Q:  I just turned on the overview stuff and I don't think news.daily is
  895. properly expiring the .overview files.  I'm using a Pyramid.
  896. A:  Do you need quotes in your crontab entry?  Look at your news.daily
  897. report -- expire using "expireover delayrm" should take a few minutes.
  898. If it takes longer than, say, 10-20, then the keywords aren't being
  899. seen by news.daily so perhaps the commandline quoting is wrong.
  900.  
  901. i.e. you had:
  902.  
  903.      su news -c /usr/lib/news/bin/news.daily delayrm expireover
  904.  
  905. You should have:
  906.  
  907.      su news -c "/usr/lib/news/bin/news.daily delayrm expireover"
  908.  
  909.  
  910. ======================================================================
  911.  
  912.                  STARTUP PROBLEMS AND SYSLOG MESSAGES
  913.  
  914. ======================================================================
  915.  
  916.  
  917. ------------------------------
  918.  
  919. Subject: syslog message: ME internal no to group
  920.  
  921. Nelson Minar <nelson@reed.edu> discovered the hard way that:
  922.  
  923. If you set MERGE_TO_GROUPS to "DO",
  924.  
  925. You have to have a "to" group listed in your "active" file or you will
  926. get the above syslog message and innd will not start.
  927.  
  928.  
  929. ------------------------------
  930.  
  931. Subject: syslog message: ME cant sendto CCreader bytes 4 No such file or directory
  932.  
  933. (Rich Salz replies:) It usually means that some ctlinnd command timed
  934. out and gave up before innd could get around to replying.  Always a
  935. problem with datagrams.  :-)  Usually not a problem in real life
  936. however.  In INN1.3, the timeout stuff is handled better so most of
  937. these should go away.
  938.  
  939.  
  940. ------------------------------
  941.  
  942. Subject: syslog message: ME internal no control and/or junk group
  943.  
  944. You must have a newsgroup named "control" and a newsgroup named
  945. "junk" for innd to start.
  946.  
  947.  
  948. ------------------------------
  949.  
  950. Subject: syslog message: ME bad_newsfeeds no feeding sites
  951.  
  952. (Rich Salz replies:) The syslog message is telling you that you are not
  953. feeding news to any sites.  You have to have at least one feed.  (You
  954. may consider this to be a bug, it's just that I'm too lazy to make
  955. everything work right if you don't have any newsfeeds.)
  956.  
  957. Until you go into production and start feeding sites, add a line like this:
  958.         dummy-feed:!*::
  959.  
  960.  
  961. ------------------------------
  962.  
  963. Subject: Why do all these "readclose" messages show up in my syslog?
  964.  
  965. Chris Schmidt <cs@germany.eu.net> says:
  966.  
  967. The "readclose" message indicates that a remote connection to your
  968. server was not correctly terminated with the server-command "quit".
  969. This can have two reasons.  First the line your feed uses to connect to
  970. you might be instable so that the connection drops every now and then.
  971. Solution:  either ignore theses messages or find out why the line is
  972. unstable.  The second reason for these messages could be a
  973. missconfigured client-program at your feed.  This means the program
  974. (e.g nntplink) does close the connection without sending the "quit"
  975. first.  If you configure a lower number for the exit-timeout (-e) than
  976. the close-timeout (-C) in nntplink then exactly this will happen.
  977. Solution:  ask your feed to fix its nntplink-setup.  Let me repeat
  978. that:  If you are using "nntplink" your -e value must be higher than
  979. your -C value.
  980.  
  981.  
  982. ------------------------------
  983.  
  984. Subject:  "File exists writing symlinking article file -- throttling"
  985.  
  986. QUESTION: I'm running INN 1.4, and the server throttles itself, saying
  987. "File exists writing symlinking article file -- throttling".  Why?  I
  988. have no clue, other than to note that the message is being emitted
  989. while innd/art.c tries to link a crossposted group.
  990.  
  991. ANSWER:  Innd wrote the article to comp/foo/123 and then tried to
  992. symlink it to alt/bar/128 and found that the symlink failed with errno
  993. == EEXIST.  This generally only happens when your active file does not
  994. match your file/directory use.  The two most common cases of that are:
  995.  
  996.         Trying to use MMAP on Ultrix
  997.         Trying to use MMAP on Linux
  998.         Some strange interaction with tind.
  999.  
  1000. If you are using Ultrix or Linux, turn off MMAP.  You don't have a choice in
  1001. this.  The Ultrix mmap() function does something completely different
  1002. than the Sun/BSD mmap() function.  The Linux function gives you some
  1003. of the functionality that Sun/BSD mmap() function has, but not enough.
  1004. (The Linux people expect to have it fully up to spec eventually.)
  1005.  
  1006. At least one person has reported problems with ICL DRS6000 SVR4 Unix
  1007. when using MMAP.  Try turning off MMAP if you find problems.
  1008.  
  1009. It has been reported that tind writes to the active file and this
  1010. confuses innd (innd assumes it is the only process writing to the
  1011. active file).  If you are using tin, upgrade to the newest version of
  1012. tin which can read the overview (NOV) database instead of the "tin"
  1013. database.
  1014.  
  1015. To fix the active file (which may be corrupted), make sure nobody
  1016. else is writing to the active file, then do
  1017.         ctlinnd renumber ''
  1018. to get things synchronized again.
  1019.  
  1020.  
  1021. ------------------------------
  1022.  
  1023. Subject: "cant fopen <newsgroup>/.thread No such file or directory"
  1024.  
  1025. Q: nnrpd logs "cant fopen <newsgroup>/.thread No such file or
  1026.    directory" hundreds of times a day although I installed trn-3 and
  1027.    maintain an overview database.  Why doesn't trn use overview files
  1028.    instead of mthreads data?
  1029.  
  1030. A: trn-3 tries to open .thread files (or use XTHREAD) first because
  1031.    $spooldir/db.init still exists.  Delete it.
  1032.  
  1033.  
  1034. ======================================================================
  1035.  
  1036.                              MISC QUESTIONS
  1037.  
  1038. ======================================================================
  1039.  
  1040.  
  1041. ------------------------------
  1042.  
  1043. Subject: Can I edit my configuration files where they are, or do
  1044. I have to edit them in $INN/site ?
  1045.  
  1046. Technically, you should edit those files in the $INN/site directory, but
  1047. then typing "make" all the time becomes a grind.  I found that I was
  1048. constantly forgetting to type "make" and then I couldn't figure out why
  1049. my changes weren't doing anything.  The alternative is to edit things
  1050. in place and let the install procedure complain.  It will error out on
  1051. the file, and you can copy that file to $INN/site then "make" again.
  1052.  
  1053.  
  1054. ------------------------------
  1055.  
  1056. Subject: syslog: ME cant nonblock 15 Operation not supported.
  1057.  
  1058. I get the following "syslog" message in /var/adm/messages:
  1059.  
  1060. Dec  2 20:40:04 venus innd: ME cant nonblock 15 Operation not supported
  1061.  
  1062. Answer: (from paulr@umbc4.umbc.edu (Paul Riddle))
  1063.  
  1064. It turns out that this is happening because /usr/spool/news on the
  1065. machine running innd is an NFS-mounted filesystem, and innd is trying
  1066. to do an FIONBIO on my feed file, which is under /usr/spool/news/out.going.
  1067.  
  1068. (tal@warren.mentorg.com adds:)
  1069. All news transports (INN, C news, B news) want the spool partition to
  1070. be local.  Newsreader can read from an NFS mounted partition without
  1071. any problems but innd should only see local partitions.  NFS has a
  1072. blatant disregard for many of the file semantics that are needed for a
  1073. good news implementation.  If you don't agree, please feel free to
  1074. prove the authors of B news, C news, and INN wrong.  Include source
  1075. code. :-)
  1076.  
  1077. Systems without unix-domain sockets sometimes see this error.
  1078.  
  1079.  
  1080. ------------------------------
  1081.  
  1082. Subject: Suddenly my active and history files are owned by root!
  1083.  
  1084. rc.news runs from root.  After that, everything else should run as
  1085. news.  More specifically, it sounds like you've run news.daily as root
  1086. by mistake.  Make sure all your cron jobs run as news and you'll be
  1087. fine.
  1088.  
  1089. If you have an old "cron" system, you might consider replacing yours
  1090. with one of the many public domain replacements.  If you can't create
  1091. a different "crontab" for each user, the idiom is something like:
  1092.  
  1093. 0 * * * * * su news -c '/do/this/as/news'
  1094.  
  1095.  
  1096. ------------------------------
  1097.  
  1098. Subject: What can I do if I can't purchase the O'Reiley And Associates book
  1099. on Managing Usenet?
  1100.  
  1101. Hold a fundraiser?
  1102.  
  1103. Seriously, this document will help you some.  HOWEVER many people have
  1104. thought that the install.ms doc was incomplete but then re-read the
  1105. "First Time Installation" portion and were amazed how good it was.
  1106. Personally, I've been a newsadmin for too long to be able to know if it
  1107. would be good for beginners.
  1108.  
  1109.  
  1110. ------------------------------
  1111.  
  1112. Subject: Getting an active file.
  1113.  
  1114. >     In appendix IV, the reader is told that "the easiest way to
  1115. > [find out which groups to create] is usually to ask [your newsfeed
  1116. > site] for a copy of their active file, and for you to add the entries
  1117. > of the groups that you're interested in." It would have been nice to
  1118. > get instructions on where this active file lives, and how to create
  1119. > the new groups, without digging through manpages (I still haven't
  1120. > found out what the proper path and incantations are. How are these
  1121. > commands issued? As shell commands? As news articles?).
  1122.  
  1123. If your neighbor doesn't know where his/her active file is, you should
  1124. look for another neighbor.  "man active" will tell you on the first
  1125. line.  Different sites put it in different places.  The man page should
  1126. tell you where it is.
  1127.  
  1128. Here is how you zap someone else's active file to make it ready
  1129. for re-use:
  1130.  
  1131. sed <active.old >active.new \
  1132.        -e 's/^\([^ ]*\) [0-9]* [0-9]* \([^ ]*\)$/\1 0000000000 000000001 \2/'
  1133.  
  1134.  
  1135. ------------------------------
  1136.  
  1137. Subject: How do I use nntplink with INN?
  1138.  
  1139. First of all, I don't personally recommend using this program.  I feel
  1140. that it is a gimick.  However, if you decide to join the INN Instant
  1141. Propagation Party (INN-IPP), I suggest that you first run the feed using
  1142. traditional methods for a month so that you make sure you are used to
  1143. INN and make sure that the feed is properly functioning.  Once you're
  1144. ready, here's a cookbook example of an newsfeeds entry using nntplink.
  1145.  
  1146. PLEASE make sure traditional "nntpsend"-style feeds work reliably
  1147. before you switch to nntplink.
  1148.  
  1149. netcomsv.netcom.com\
  1150.     :*,!junk/!ParcPlace\
  1151.     :Tc,Wnm,S1024:/usr/local/news/bin/nntplink -i stdin netcomsv.netcom.com
  1152.  
  1153. INN 1.2 users should have an explicit S value (i.e. S1024 or S16384).
  1154. Without it innd 1.2 can choke and lose data if the receiver is jammed.
  1155. (fixed in INN 1.3).
  1156.  
  1157. The latest version of nntplink is available from
  1158. shape.mps.ohio-state.edu:/pub/nntplink/3.2pl1.tar.gz.
  1159.  
  1160. Ian Phillipps <ian@unipalm.co.uk> notes some criteria for using
  1161. nntplink rather than nnptsend:
  1162.  
  1163. > (1) If you have more than one backbone feed, you can save a lot of
  1164. > bandwidth, without risk, if you use nntplink (less duplication of
  1165. > articles over nearly-parallel paths).
  1166.  
  1167. > (2) More important, if you have a large number of feeds, nntplink
  1168. > permits them to be fed simultaneously with the same articles.  No big
  1169. > deal, until you think of the what's going on in the pagedaemon and the
  1170. > disk cache.
  1171.  
  1172. > A "ps uaxr" rarely catches nntplink in the act ("D"), despite my having
  1173. > 17 of them last time I counted. Our biggest outgoing newsfeed delivered
  1174. > 16398 articles yesterday, using a total of 380 seconds CPU on a Sun
  1175. > IPC, and no disk time :-)
  1176.  
  1177.  
  1178. ------------------------------
  1179.  
  1180. Subject: How do I use newsgate with INN?
  1181.  
  1182. anselmo@nic.near.net (Ed Anselmo) reports:
  1183.  
  1184. > Can someone who's running INN and the news2mail program in the
  1185. > newsgate package send me a sample of the entry in the newsfeeds
  1186. > file for a typical bidirectional gateway? Thanks!
  1187.  
  1188. This assumes you configured "mail2news" to put a distinctive
  1189. host-gateway name, like "news-mail-gateway" in your Path: headers.
  1190.  
  1191. In /usr/lib/news/newsfeeds:
  1192. ====================================
  1193. ##
  1194. ##  NEWS/MAIL GATEWAY
  1195. ##
  1196.  
  1197. tech-gateway/news-mail-gateway\
  1198.         :ne.nearnet.tech\
  1199.         :Tp:/usr/lib/newsbin/news2mail \
  1200.         nearnet-tech nearnet-ops nearnet-tech-request nic.near.net %s
  1201. ====================================
  1202.  
  1203. On the mailing list side, one of the recipients is:
  1204.  
  1205. post-nearnet-tech: "|/usr/lib/newsbin/mail2news -n ne.nearnet.tech -o 'NEARnet News/Ma
  1206. il Gateway' -d ne"
  1207.  
  1208.  
  1209. ------------------------------
  1210.  
  1211. Subject: Other cron jobs.
  1212.  
  1213. Once a night you should run the "news.daily" script which will
  1214. expire old articles, run the daily reports, etc.  It should run
  1215. as "news" and look something like this:
  1216.  
  1217. 40 23 * * *               /usr/lib/news/bin/news.daily delayrm
  1218.  
  1219. If you get news feeds via UUCP, you might want to add this cron
  1220. job (also as "news") which checks to see if any batches arrived
  1221. while innd was down and processes them.
  1222.  
  1223. 20 * * * *                /bin/rnews -U
  1224.  
  1225.  
  1226. ------------------------------
  1227.  
  1228. Subject: After a crash.
  1229.  
  1230. "What do I do after a system crash?"
  1231.  
  1232. INN handles crashes pretty well.  If there are any problems they
  1233. get cleaned up by the nightly expire.  About once a month you
  1234. might want to run "makehistory -bu" to look for "lost" articles.
  1235. Check the man page for "makehistory" for more information.
  1236.  
  1237.  
  1238. ------------------------------
  1239.  
  1240. Subject: Debugging someone that is feeding you.
  1241.  
  1242. David Myers <dem@meaddata.com> suggests that if a neighbor complains
  1243. that their feed to you doesn't work: (1) make sure they've read the man
  1244. pages, and (2) have them send a copy of their newsfeeds file.
  1245.  
  1246.  
  1247. ------------------------------
  1248.  
  1249. Subject: Feeds suddenly can't connect anymore!
  1250.  
  1251. Q:  How come feeds tell me they can't connect to me any more?
  1252.  
  1253. A:  When innd starts up it reads the hosts.nntp file and looks up the
  1254. IP addresses for all the entries mentioned there.  The problem is that
  1255. this data is dynamic (sometimes people change IP addresses), and innd
  1256. never goes back to check.  If your system stays up for days and one of
  1257. your feeds changes their IP address, innd will reject them.  Rich plans
  1258. to handle this in INN1.5, but for now you might find it useful to do a
  1259. "ctlinnd reload hosts.nntp" out of cron every day or so or when you
  1260. notice there's a problem.
  1261.  
  1262.  
  1263. ------------------------------
  1264.  
  1265. Subject: How does the "ME" line interact with the other lines?
  1266.  
  1267. > I'm still a little confused about the ME line's second field.
  1268.  
  1269. The man page as of INN 1.3 is much more clear on this.  Basically, the
  1270. second field of the "ME" line specifies the default for the rest of the
  1271. feeds.  Otherwise, it isn't used.  The "active" file declares which
  1272. newsgroups you accept and don't accept.
  1273.  
  1274. Here are some examples:
  1275.  
  1276. ME:!*:::
  1277. foo:!junk:...        --send no newsgroups
  1278.  
  1279. ME:*:::
  1280. foo:!junk:...        --send all newsgroups except junk
  1281.  
  1282. ME:!*:::
  1283. foo:*,!junk:...      --send all newsgroups except junk
  1284.  
  1285. By the way, generally you do not want to send "junk" or "control" to
  1286. your neighbors.
  1287.  
  1288.  
  1289. ------------------------------
  1290.  
  1291. Subject: Why doesn't nntpget work?
  1292.  
  1293. The nntpget in INN 1.2 doesn't work.  Period.  Upgrade to the latest version
  1294. of INN.
  1295.  
  1296.  
  1297. ------------------------------
  1298.  
  1299. Subject: More about the "to.*" groups
  1300.  
  1301. (Thanks to jmalcolm@sura.net (Joseph Malcolm) for supplying
  1302. these answers.)
  1303.  
  1304. >1) Why did my local INN act on the sendsys posted to to.neighbor?
  1305.  
  1306. to.* groups aren't magic to INN. Your system received the message,
  1307. it acted on it.
  1308.  
  1309. >2) Why did my neighbor send the cmsg to all of his neighbors?
  1310.  
  1311. See 3.
  1312.  
  1313. >3) Is is related to having the "control" group in our newsgroups patterns?
  1314.  
  1315. Yes.
  1316.  
  1317. >   The INN docs say you probably don't want to do this, but they don't say
  1318. >   why.
  1319.  
  1320. Actually, they do. This is from innd(8):
  1321.  
  1322.      Sites may explicitly have the ``control'' newsgroup in their
  1323.      subscription  list,  although  it is usually best to exclude
  1324.      it.  If a control message is posted to a  group  whose  name
  1325.      ends  with  the  four characters ``.ctl'' then the suffix is
  1326.      stripped off and what is left is used  as  the  group  name.
  1327.      For  example,  a cancel message posted to ``news.admin.ctl''
  1328.      will be sent to all sites that subscribe to  ``control''  or
  1329.      ``news.admin.''
  1330.  
  1331. There is also a pointer to this in newsfeeds(5).
  1332.  
  1333. >   But I still need it in my active file, right?
  1334.  
  1335. Yes.
  1336.  
  1337.  
  1338. ------------------------------
  1339.  
  1340. Subject: I'm getting groups sent to me that I don't want.
  1341.  
  1342. Tell the system administrator(s) of the machine(s) that feed news to
  1343. you to stop sending those groups.  There is no other way to do it.  (In
  1344. B or C News, the groups would end up in junk; at least with INN they
  1345. are not taking up space.  You should compile with WANT_JUNK set to
  1346. DONT).
  1347.  
  1348. If the people that feed you use B news or C news, remember that they
  1349. don't use a "newsfeeds" file.  They use a file called "sys" which has a
  1350. completely different format method for listing newsgroups.
  1351.  
  1352.  
  1353. ------------------------------
  1354.  
  1355. Subject: When my feeder connects, I get articles but they don't take what's waiting for them.
  1356.  
  1357. I hate to say this, but this really shows that you haven't RTFMed very
  1358. much.
  1359.  
  1360. News is not bidirectional (it's like SMTP, not UUCP).  If you want to
  1361. send things out you will have to make sure that you run send-nntp or
  1362. nntpsend from cron.  nntpsend is easier and elsewhere in this document
  1363. there are cookbook examples of what to add every time you set up a new
  1364. feed.
  1365.  
  1366.  
  1367. ------------------------------
  1368.  
  1369. Subject: Directories are being created with wrong permissions.
  1370.  
  1371. > Question:
  1372. >When I received news for /var/spool/news/foo/bar for the first
  1373. >time, the directories got created:
  1374. >
  1375. ># ls -lgR foo
  1376. >total 1
  1377. >d-wx-w-rwx  2 news     news          512 Feb  9 00:03 bar/
  1378. >
  1379. >What did I do wrong?
  1380. >
  1381. >##  Mode that directories are created under.
  1382. >#### =()<GROUPDIR_MODE          @<GROUPDIR_MODE>@>()=
  1383. >GROUPDIR_MODE           2775
  1384.  
  1385.   Answer:
  1386. You forgot a zero in front of this number, for the C compiler to interpret it
  1387. as octal instead of decimal.
  1388.  
  1389.  
  1390. ------------------------------
  1391.  
  1392. Subject: Warnings to people that must set HAVE_UNIX_DOMAIN to DONT
  1393.  
  1394. Disclaimer:  First of all, if you have to set HAVE_UNIX_DOMAIN to DONT,
  1395. YOU HAVE TO SET IT to DONT.  It's not a choice you can make, it's a
  1396. description of the operating system that you purchased.  If you wrongly
  1397. set this variable to DO your system isn't going to work *at* *all*.
  1398.  
  1399. When you use the POST via NNTP, you are talking to nnrpd.  nnrpd cleans
  1400. up your headers, adds the missing headers that it is allowed to add,
  1401. checks whatever it checks, and then submits the finalized version to
  1402. innd.  How does it talk to innd?
  1403. If you have HAVE_UNIX_DOMAIN set to DO, nnrpd opens a Unix domain
  1404. socket and sends the text.  At this point it is talking to innd
  1405. somewhat like ctlinnd does.  innd can trust that the post isn't
  1406. forged since it is coming from a program trustworthy enough to
  1407. get to the socket (which isn't much).
  1408. If you have HAVE_UNIX_DOMAIN set to DONT, it has no choice but to open
  1409. a socket to port 119 and issue the "IHAVE" command, and send the text
  1410. that way (just like a remote newsreader).  This means that innd (not
  1411. another nnrpd) has to be at the other end of the pipe.  If it opens the
  1412. connection and sees a "nnrpd" you're hosed and you get "441 480
  1413. Transfer permission denied".  To get innd to not hand off the
  1414. connection to a nnrpd process, you must have the host's name in the
  1415. hosts.nntp file.  (don't forget to do "ctlinnd reload hosts.nntp")
  1416.  
  1417. If you have your host's name in the hosts.nntp file, then any
  1418. newsreader running on your nntphost must be "INN-aware" (i.e. that they
  1419. issue the "mode reader" command) or they must read news via the file
  1420. system instead of NNTP.
  1421.  
  1422. There is no way around this right now.
  1423.  
  1424.  
  1425. - * The End * -
  1426. -- 
  1427. Tom Limoncelli -- tal@warren.mentorg.com (work) -- tal@plts.org (play)
  1428. "Psst!  Hey, Anthony!  Y'know what I        | Disclaimer:  I do not
  1429. like about existing?"  "Uh... uh... what?"  | speak for Mentor Graphics.
  1430. "Possessing a physical extension."  -TSA    |
  1431.